<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>rem基本使用</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        /* 1.给HTML标签加字号 */
        html {
            font-size: 30px;
        }

        /* 2.使用rem单位书写尺寸 */
        .box {
            width: 5rem;
            height: 3rem;
            background-color: pink;
        }

    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>